<html>
<head><meta charset="utf-8"><title>fixme for const_generics_defaults · project-const-generics · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/index.html">project-const-generics</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html">fixme for const_generics_defaults</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="240679802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/fixme%20for%20const_generics_defaults/near/240679802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html#240679802">(May 29 2021 at 03:06)</a>:</h4>
<p>Does anyone know what <a href="https://github.com/rust-lang/rust/blob/master/compiler/rustc_resolve/src/lib.rs#L244-L245">this</a> fixme is about?</p>
<p><code>rustc_resolve::ResolutionError</code> has a fixme on this enum variant <span aria-label="thinking" class="emoji emoji-1f914" role="img" title="thinking">:thinking:</span></p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">    </span><span class="sd">/// Error E0128: generic parameters with a default cannot use forward-declared identifiers.</span>
<span class="w">    </span><span class="n">ForwardDeclaredTyParam</span><span class="p">,</span><span class="w"> </span><span class="c1">// FIXME(const_generics_defaults)</span>
</code></pre></div>
<p>it seems to be older than <span class="user-mention" data-user-id="326189">@jknodt</span>'s PR that implement const_generics_defaults and the errors look fine for forward declared stuff</p>



<a name="240953179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/fixme%20for%20const_generics_defaults/near/240953179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html#240953179">(Jun 01 2021 at 14:49)</a>:</h4>
<p><span class="user-mention" data-user-id="326176">@Boxy [she/her]</span> I don't know off hand</p>



<a name="240954917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/fixme%20for%20const_generics_defaults/near/240954917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> varkor <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html#240954917">(Jun 01 2021 at 15:00)</a>:</h4>
<p><span class="user-mention" data-user-id="326176">@Boxy [she/her]</span>: I think we just need to add a test for <code>E0128</code> for const generics, and rename <code>ForwardDeclaredTyParam</code> to <code>ForwardDeclaredGenericParam</code>. E.g.</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="cp">#![feature(const_generics_defaults)]</span><span class="w"></span>
<span class="k">struct</span> <span class="nc">Foo</span><span class="o">&lt;</span><span class="k">const</span><span class="w"> </span><span class="n">T</span>: <span class="kt">u32</span> <span class="o">=</span><span class="w"> </span><span class="n">U</span><span class="p">,</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="n">U</span>: <span class="kt">u32</span> <span class="o">=</span><span class="w"> </span><span class="mi">0</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"> </span><span class="c1">//~ ERROR</span>
</code></pre></div>



<a name="240955425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/fixme%20for%20const_generics_defaults/near/240955425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html#240955425">(Jun 01 2021 at 15:03)</a>:</h4>
<p>that would make sense, ill take a look and see if we have a test and if not add one</p>



<a name="240959770"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/fixme%20for%20const_generics_defaults/near/240959770" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html#240959770">(Jun 01 2021 at 15:30)</a>:</h4>
<p>oooh, maybe something went wrong during a rebase before the const generics defaults PR landed, I remember varkor had renamed this in their refactoring branch, and updated this fixme to mention the need for a test</p>



<a name="240959814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/fixme%20for%20const_generics_defaults/near/240959814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html#240959814">(Jun 01 2021 at 15:31)</a>:</h4>
<p><span aria-label="sweat smile" class="emoji emoji-1f605" role="img" title="sweat smile">:sweat_smile:</span></p>



<a name="240959851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/fixme%20for%20const_generics_defaults/near/240959851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html#240959851">(Jun 01 2021 at 15:31)</a>:</h4>
<p>(found it: <a href="https://github.com/rust-lang/rust/blob/2ea320aa346851638b6b5df38ab3795ec1b73eff/compiler/rustc_resolve/src/lib.rs#L216-L217">https://github.com/rust-lang/rust/blob/2ea320aa346851638b6b5df38ab3795ec1b73eff/compiler/rustc_resolve/src/lib.rs#L216-L217</a>)</p>



<a name="240959973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/fixme%20for%20const_generics_defaults/near/240959973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html#240959973">(Jun 01 2021 at 15:32)</a>:</h4>
<p>ah cool <span aria-label="smile" class="emoji emoji-1f642" role="img" title="smile">:smile:</span></p>



<a name="240964924"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/260443-project-const-generics/topic/fixme%20for%20const_generics_defaults/near/240964924" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Boxy [she/her] <a href="https://rust-lang.github.io/zulip_archive/stream/260443-project-const-generics/topic/fixme.20for.20const_generics_defaults.html#240964924">(Jun 01 2021 at 16:06)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/85896">#85896</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>